package uml.behavioral.interpreter;

import uml.behavioral.interpreter.exception.IllegalInstructionException;

/**
 * 解释器--非终结符表达式<br>
 * on 2022/12/31 0:21
 */
public class AndNode extends AbstractNode{
    private AbstractNode left;
    private AbstractNode right;

    public AndNode(AbstractNode left, AbstractNode right) {
        this.left = left;
        this.right = right;
    }

    @Override
    public String interpret() throws IllegalInstructionException {
        return left.interpret()+",\n然后"+right.interpret();
    }
}
